import matplotlib.pyplot as plt
import numpy as np
from test0 import create_coordinate_system

# 创建一个坐标系
fig, ax = create_coordinate_system()

# 添加一个sin(x) 的函数图像
x = np.linspace(-np.pi/2, np.pi/2, 100)
y = np.sin(x)

# 绘制sin(x) 的反函数图像 arcsin x
x1 = np.linspace(-1, 1, 100)
y1 = np.arcsin(x1)

# 绘制y = x 的图像
x2 = np.linspace(-np.pi, np.pi, 100)
y2 = x2

ax.plot(x, y, linewidth=2, label='y = sin(x)', color='black', linestyle='--')
ax.plot(x1, y1, linewidth=2, label='y = arcsin(x)', color='red')
ax.plot(x2, y2, linewidth=2, label='y = x', color='black')

ax.legend()
plt.show()
